package com.neusoft.controller;

import com.neusoft.service.DepartmentService;
import com.neusoft.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author akemihomurasama
 */
@RestController
@RequestMapping("/department")
@CrossOrigin
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;
    /**
     * 查询所有科室
     * @return 科室列表
     */
    @RequestMapping("/queryAllDepartment")
    public Result queryAllDepartment() {
        return Result.ok(departmentService.queryAllDepartment());
    }
}
